Skip to content

feat(capture): Support for "prepend" as field in capture templates - #1159

Merged
kristijanhusak merged 14 commits into
nvim-orgmode:masterfrom
freddrH:feat/prepend_in_capture_template
Oct 1, 2026
Merged

kristijanhusak merged 14 commits into
nvim-orgmode:masterfrom
freddrH:feat/prepend_in_capture_template

Conversation

@freddrH

@freddrH freddrH commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In emacs orgmode capture templates can have the property ":prepend". By default captured items are places as the last child (last headline, sub-headline, etc) at the destination. By setting prepend captured items are prepended (placed as the first item at the target) .

Been working with a hack in capture/init.lua locally to have this feature for all templates for myself. Now added the feature to set it in the capture template, as it should be.

Related Issues

Related #

Closes #

Changes

  • Added field to capture templates
  • target_headline can now have two different outcomes (first and last)

Checklist

I confirm that I have:

  • Followed the
    Conventional Commits
    specification
    (e.g., feat: add new feature, fix: correct bug,
    docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
    (starting here as discussed)
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with
    make test.
    (starting here as per discussed, not savvy with testing, looking for pointer)
  • Checked for breaking changes and documented them, if any.

@freddrH

freddrH commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Added test for "at beginning" in capture_spec.

@freddrH

freddrH commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Github-tests for clock_spec are failing on ubuntu 11.3. I havent touched anything related to clock, cant make sense of it!

Other than that I think I'm as done as I can get on my own.

@kristijanhusak kristijanhusak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kristijanhusak
kristijanhusak merged commit 9c67414 into nvim-orgmode:master Oct 1, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants